package com.gmt.controller;

import com.gmt.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.List;

/**
 * @author John.zhang
 * @version Id: FreemarkerController, v 1.0 2020/11/12 11:41 ZhiYong Exp $
 */
@Controller
public class FreemarkerController {

    @RequestMapping("/freemarker/getUsers")
    public String getUsers(Model model){
        List<User> list = new ArrayList<>();
        list.add(new User(1,"John",22));
        model.addAttribute("list",list);
        return "user";
    }


}
